package com.lisen.common.base.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class SystemConfig {
	private static final Log log = LogFactory.getLog(SystemConfig.class);
	private static SystemConfig instance;

	private SystemConfig() {
		load();
	}

	public static SystemConfig getInstance() {
		if (instance == null) {
			instance = new SystemConfig();
		}
		return instance;
	}

	/**
	 * configure file name
	 */
	protected String config = "systemconfig";

	/**
	 * Properties
	 */
	private static PropertyUtil property = null;

	/**
	 * 
	 * 加载配置文件
	 */
	private void load() {
		property = PropertyUtil.newInstance(config);
	}

	public String getProperty(String key) {
		return property.getMsg(key);
	}
}
